﻿using System;
using UnityEngine;

public class TriggerEventListener : MonoBehaviour
{
    public event Action OnPlayerEnter;
    
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.gameObject.layer == Layers.Player)
        {
            OnPlayerEnter?.Invoke();
        }
    }
}